layui.use(['form','jquery','layer'], function(){
    var form = layui.form;
    var $ = layui.jquery;
    var layer = layui.layer;
    //监听提交
    form.on('submit(formDemo)', function(data){
        queding();
        return false;
    });
    var result="";
    form.on('radio(shenhe)',function (data) {
        result = data.value;
    })
    queding = function quding() {
        var implementId = localStorage.getItem("createId");
        if(result=="yes"){
            result="1";
        }else{
            result="3";
        }
        var json =
            {
                result:result,
                remarks:$("#remarks").val(),
                implementId:implementId,
                id:$("#id").val(),
                type:"4"
            }
        $.ajax({
            type:"post",
            url:"/microEx/updateMicro",
            dataType:"json",
            data:json,
            success:function (data) {
                var index  = parent.layer.getFrameIndex(window.name);
                parent.location.reload();
                parent.layer.close(index);
            }
        });
    };
    $('#quxiao').click(function () {
        var index = parent.layer.getFrameIndex(window.name);
        parent.layer.close(index);
    });
});